<?php 
session_start();
require_once("include/authen.php");
require_once("include/ui.php");
 
if ($_SESSION["permission"][$stockScreen]["View"]=="0"){
	echo "<script>alert('".$no_permit."');</script>";
	echo "<meta http-equiv = refresh ; content = '0 ; url = mainscreen.php'>";
	exit();
}
echo headerPage("Stock Product");
?>

<SCRIPT src="js/js_stock.js"></SCRIPT> 
<FORM name="Act" action="<?php echo $PHP_SELF?>" method="post"> 
<INPUT type=hidden value="<?php echo $_SESSION['branchtype'];?>" id="isHO" name="isHO"> 
<table width="1024" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="10" style='border-left:2px solid #facb0c;'>&nbsp;</td>
    <td width="1004" valign="top">
        <div class="content-box">
            <div Class="toolbar-box">   
                <div class="t">
                    <div class="t">
                        <div class="t"></div>
                    </div>
                 </div>
                 <div class="m">
                    <div class="toolbar">
                        <table class="toolbar">
                        <tr>
                            <td>
								<a href="javascript:void('0');" title="Print" id="btnPrint">
								<span class="icon_Print"></span>Print
								</a>
							</td>
                        </tr>
                        </table>
                    </div>
                      <div class="header" style="background-image: url(images/stock.png);">
						Stock Product
                      </div>
                <div class="clr"></div>
                 </div>
                 <div class="b">
                    <div class="b">
                        <div class="b"></div>
                    </div>
                 </div>
            </div>
               <div id="element-box">
                <div class="t">
					<div class="t">
						<div class="t"></div>
					</div>
				</div>
                <div class="m">
				  <table width="100%" cellspacing="3px">
					<?php  if ($_SESSION['branchtype'] =="1"){ ?>
						<tr>
							<td width="15%" class="fontSearch" style="padding-left:20">
								Branch Name : 
							</td>
							<td width="85%" align=left >
								<select id="cboBranch" style="width:15em;"></select>
							</td>
						</tr>
					<?php  }?>
                        <tr>
                            <td width="15%" class="fontSearch" style="padding-left:20">
                            Product Name : 
                            </td>
							<td width="85%" align=left >
							<input id="txtProduct"  title="Filter by Code "  type="text"  	size=40 name="txtProduct" class="boxItem" />
							</td>
                         </tr>
                        <tr>
                            <td width="15%" class="fontSearch" style="padding-left:20">
                            Category : 
                            </td>
							<td width="85%" align=left >
							 <select id="cboCategory" style="width:15em;"></select>
							</td>
                         </tr>
						 <tr>
							<td width="15%" class="fontSearch" style="padding-left:20">
								Type :
							</td>
							<td width="85%" align=left >
								<input type='checkbox' value="1" id="POS" name="type"  />POS 
								<input type='checkbox' style="margin-left:20px" id="Stock" name="type" value="2"/>Stock
								<input type='checkbox' style="margin-left:20px" id="Premium" name="type" value="3"/>Premium
							</td>
						 </tr>
                       <!--tr>
                            <td width="15%" class="fontSearch" style="padding-left:20">
                            Type : 
                            </td>
							<td width="85%" align=left >
							<select id="cboType" style="width:15em;">
							</select>
							</td>
                         </tr-->						 
						 <tr><td/><td>
						 <a href="javascript:void('0');" id="btnSearch">
						 <img src="./images/btn-search.gif" border=0/></a> </td></tr>
						 <tr><td colspan="2"></tr>
                    </table>
                    <table cellspacing="1" id="resultData" class=list>
                    <thead>
                       <tr>
								<th width="3%" >No.</th>
								<th style='display:none' >BranchID</th>
								<th style='display:none' >ProductID.</th>
								<?php  if ($_SESSION['branchtype'] =="1"){ ?>
								<th class="title" width="13%" >Branch</th>
								<th class="title" width="13%" >Product</th>
								<th  class="title" width="12%"  nowrap="nowrap">Category</th>
								<th  class="title" width="5%"  nowrap="nowrap">POS</th>
								<th  class="title" width="5%"  nowrap="nowrap">Stock</th>
								<th  class="title" width="5%"  nowrap="nowrap">Prem</th>
								<th  class="title" width="7%"  nowrap="nowrap">Unit</th>
								<th  class="title" width="7%"  nowrap="nowrap">Cost</th>
                                <th  class="title" width="7%"  nowrap="nowrap">M-Amt</th>
								<th  class="title" width="7%"  nowrap="nowrap">S-Amt</th>
								<th  class="title" width="7%"  nowrap="nowrap">Total</th>
								<?php }else{?>
								<th class="title" width="18%" >Product</th>
								<th  class="title" width="13%"  nowrap="nowrap">Category</th>
								<th  class="title" width="5%"  nowrap="nowrap">POS</th>
								<th  class="title" width="5%"  nowrap="nowrap">Stock</th>
								<th  class="title" width="5%"  nowrap="nowrap">Prem</th>
								<th  class="title" width="7%"  nowrap="nowrap">Unit</th>
								<th  class="title" width="8%"  nowrap="nowrap">Cost</th>								
                                <th  class="title" width="7%"  nowrap="nowrap">M-Amt</th>
								<th  class="title" width="7%"  nowrap="nowrap">S-Amt</th>
								<th  class="title" width="8%"  nowrap="nowrap">Total</th>
								<?php }
								if ($_SESSION["permission"][$stockScreen]["Edit"]=="1"){
								?> 
								<th  class="title" width="7%"  nowrap="nowrap">New Amt</th>
								<th  class="title" width="4%"  nowrap="nowrap">Update</th>
								<?php }?>
                      </tr>
                    </thead>
                   <tbody>
                   </tbody>
                   <tfoot>
                         <tr>
							<td colspan="<?php if ($_SESSION['branchtype'] =="1"){echo "16";}else{echo "16"; }?>">
								<div class="boxfooter">
								 <div class="totalpage">Total : <span id="rowCount">0</span>&nbsp;&nbsp;rows</div>
								 <div id="paging_button"></div>
								</div> 
							</td>
                         </tr>
                     </tfoot>
                    </table>
                  <div class="clr"></div>
                </div>
                 <div class="b"><div class="b"><div class="b"></div></div></div>
                 <div class="clr"></div>
                </div> <!-- elementbox-->
        </div>
    </td>
    <td width="10" style='border-right:2px solid #facb0c;'>&nbsp;</td>
  </tr>
</table>
 </FORM>
<?php 
echo footer();
?>